package prefuse.tp.svn;

import prefuse.action.layout.graph.RadialTreeLayout;
import prefuse.visual.NodeItem;

 public class GraphRadial_FlexibleLayout2 extends RadialTreeLayout{
	private double scaleX=1.0,scaleY=1.0;
	
	public GraphRadial_FlexibleLayout2(String group) {
	    super(group);
	}
	
	protected void setPolarLocation(NodeItem n, NodeItem p, double r, double t) {
		double rr = r;
		double tt = t;
		if(n.getInt("type") == GraphRadial_Affectations.ETUDIANT) {
			rr *=1.3;
			tt += 0.9;
			//tt *= 1.2;
		}
	    setX(n, p, m_origin.getX() + scaleX*rr*Math.cos(tt));
	    setY(n, p, m_origin.getY() + scaleY*rr*Math.sin(tt));    
	}
	
	public void setRescale(double x,double y) {
	    scaleX=x;
	    scaleY=y;
	}
}